package com.hermit.${module}.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hermit.${module}.dao.${Domain}Dao;
import com.hermit.${module}.entity.${Domain}Entity;
import com.hermit.${module}.service.${Domain}Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("${domain}Service")
public class ${Domain}ServiceImpl extends ServiceImpl<${Domain}Dao, ${Domain}Entity> implements ${Domain}Service {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    /**
    * 查询数据库所有表
    */
    public List<${Domain}Entity> queryAll () {
        List<${Domain}Entity> allDataList = baseMapper.queryAll();
        System.out.println("查询结果:" + allDataList);
        return allDataList;
    }

    /**
    * 删除
    */
    public void delete (int id) {
        ${Domain}Entity ${domain}Entity = baseMapper.selectById(id);
        ${domain}Entity.setDeleteFlag(0);
        baseMapper.updateById(${domain}Entity);
    }
}